<template>
  <div id="app">
    <!-- 为了某些页面的全屏效果，tab 栏放在各内容页 -->
    <transition name="slide-left">
      <router-view></router-view>
    </transition>
  </div>
</template>

<script>
export default {
  components: {},
  name: "app",
  watch: {
    $route: function(to, from) {
      document.body.scrollTop = 0;
      document.documentElement.scrollTop = 0;
      document.querySelector("#app").scrollTop = 0;
      return true;
    }
  },
  created() {
    // console.log(this.$store);
    // this.$store.dispatch("update_user", "zjrKBtYrGo");
    // this.$store.dispatch("update_student", "3jjkp1Tasi");
    // this.$store.dispatch("update_user", "2zQiZBFCRy");
    // this.$store.dispatch("update_student", "bjEQh2F16X");
    
  }
};
</script>

<style>
body {
  background-color: #ebebeb;
}

#app {
  font-family: Arial, Helvetica, sans-serif;
}

.slide-left-enter,
.slide-right-leave-active {
  opacity: 0;
  transform: translate(30px, 0);
}
.slide-left-leave-active,
.slide-right-enter {
  opacity: 0;
  transform: translate(-30px, 0);
}
</style>
